package operations;

import java.awt.Toolkit;
import java.awt.datatransfer.Clipboard;
import java.awt.datatransfer.StringSelection;
import java.io.Serializable;

/**
 * The Class CopyCutAdditiveOperations.
 * This class performs the  additive copy and cut operations.
 * This class extends the formatOperations class and inherits the clipboard from it.
 */
public class CopyCutAdditiveOperations extends FormatOperations implements Serializable{
	public CopyCutAdditiveOperations(){
		additiveSelectText="";
	}
	public void performOperation(String selectedText)	{
		additiveSelectText=additiveSelectText+selectedText;
		clipboardString = new StringSelection(additiveSelectText);
		Clipboard clipboard = Toolkit.getDefaultToolkit().getSystemClipboard();
		clipboard.setContents(clipboardString, this);
		
	}

}
